package com.ymttest.database.mapping.godfreight;

import com.ymttest.database.model.godfreight.DeliveryPatternConfig;
import com.ymttest.database.model.godfreight.DeliveryPatternConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface DeliveryPatternConfigMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @SelectProvider(type=DeliveryPatternConfigSqlProvider.class, method="countByExample")
    int countByExample(DeliveryPatternConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @DeleteProvider(type=DeliveryPatternConfigSqlProvider.class, method="deleteByExample")
    int deleteByExample(DeliveryPatternConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @Delete({
        "delete from delivery_pattern_config",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @Insert({
        "insert into delivery_pattern_config (Id, SellerId, ",
        "EnableCollectionGoods, ExpressDelivery, ",
        "CollectionGoods, CreateTime, ",
        "UpdateTime, ModifyCollectionGoods)",
        "values (#{id,jdbcType=INTEGER}, #{sellerId,jdbcType=INTEGER}, ",
        "#{enableCollectionGoods,jdbcType=BIT}, #{expressDelivery,jdbcType=BIT}, ",
        "#{collectionGoods,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{modifyCollectionGoods,jdbcType=BIT})"
    })
    int insert(DeliveryPatternConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @InsertProvider(type=DeliveryPatternConfigSqlProvider.class, method="insertSelective")
    int insertSelective(DeliveryPatternConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @SelectProvider(type=DeliveryPatternConfigSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="EnableCollectionGoods", property="enableCollectionGoods", jdbcType=JdbcType.BIT),
        @Result(column="ExpressDelivery", property="expressDelivery", jdbcType=JdbcType.BIT),
        @Result(column="CollectionGoods", property="collectionGoods", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ModifyCollectionGoods", property="modifyCollectionGoods", jdbcType=JdbcType.BIT)
    })
    List<DeliveryPatternConfig> selectByExample(DeliveryPatternConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @Select({
        "select",
        "Id, SellerId, EnableCollectionGoods, ExpressDelivery, CollectionGoods, CreateTime, ",
        "UpdateTime, ModifyCollectionGoods",
        "from delivery_pattern_config",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="EnableCollectionGoods", property="enableCollectionGoods", jdbcType=JdbcType.BIT),
        @Result(column="ExpressDelivery", property="expressDelivery", jdbcType=JdbcType.BIT),
        @Result(column="CollectionGoods", property="collectionGoods", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ModifyCollectionGoods", property="modifyCollectionGoods", jdbcType=JdbcType.BIT)
    })
    DeliveryPatternConfig selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @UpdateProvider(type=DeliveryPatternConfigSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") DeliveryPatternConfig record, @Param("example") DeliveryPatternConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @UpdateProvider(type=DeliveryPatternConfigSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") DeliveryPatternConfig record, @Param("example") DeliveryPatternConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @UpdateProvider(type=DeliveryPatternConfigSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(DeliveryPatternConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delivery_pattern_config
     *
     * @mbggenerated Tue Apr 21 18:53:48 CST 2020
     */
    @Update({
        "update delivery_pattern_config",
        "set SellerId = #{sellerId,jdbcType=INTEGER},",
          "EnableCollectionGoods = #{enableCollectionGoods,jdbcType=BIT},",
          "ExpressDelivery = #{expressDelivery,jdbcType=BIT},",
          "CollectionGoods = #{collectionGoods,jdbcType=BIT},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP},",
          "ModifyCollectionGoods = #{modifyCollectionGoods,jdbcType=BIT}",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(DeliveryPatternConfig record);
}